<template>
	<view class="menu-section">
		<view class="menu-group">
			<view class="menu-item" @tap="navigateToAddress">
				<image class="menu-icon" src="/static/images/icons/icon-address.svg" mode="aspectFit"></image>
				<text>收货地址</text>
				<text class="arrow">></text>
			</view>
			<view class="menu-item" @tap="navigateToCoupon">
				<image class="menu-icon" src="/static/images/icons/icon-coupon.svg" mode="aspectFit"></image>
				<text>优惠券</text>
				<text class="arrow">></text>
			</view>
			<view class="menu-item" @tap="navigateToFavorite">
				<image class="menu-icon" src="/static/images/icons/icon-favorite.svg" mode="aspectFit"></image>
				<text>我的收藏</text>
				<text class="arrow">></text>
			</view>
		</view>
		<view class="menu-group">
			<view class="menu-item" @tap="navigateToAfterSale">
				<image class="menu-icon" src="/static/images/icons/icon-after-sale.svg" mode="aspectFit"></image>
				<text>售后服务</text>
				<text class="arrow">></text>
			</view>
			<view class="menu-item" @tap="navigateToCustomerService">
				<image class="menu-icon" src="/static/images/icons/icon-customer-service.svg" mode="aspectFit"></image>
				<text>联系客服</text>
				<text class="arrow">></text>
			</view>
			<view class="menu-item" @tap="navigateToAbout">
				<image class="menu-icon" src="/static/images/icons/icon-about.svg" mode="aspectFit"></image>
				<text>关于我们</text>
				<text class="arrow">></text>
			</view>
		</view>
	</view>
</template>

<script setup>
const navigateToAddress = () => {
	uni.navigateTo({
		url: '/pages/address/index'
	})
}

const navigateToCoupon = () => {
	uni.navigateTo({
		url: '/pages/coupon/index'
	})
}

const navigateToFavorite = () => {
	uni.navigateTo({
		url: '/pages/favorite/index'
	})
}

const navigateToAfterSale = () => {
	uni.navigateTo({
		url: '/pages/after-sale/index'
	})
}

const navigateToCustomerService = () => {
	uni.navigateTo({
		url: '/pages/customer-service/index'
	})
}

const navigateToAbout = () => {
	uni.navigateTo({
		url: '/pages/about/index'
	})
}
</script>

<style lang="scss">
.menu-section {
	margin: 20rpx;
	
	.menu-group {
		background-color: #FFFFFF;
		border-radius: 20rpx;
		margin-bottom: 20rpx;
		box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
		
		.menu-item {
			display: flex;
			align-items: center;
			padding: 30rpx;
			border-bottom: 1rpx solid #F5F5F5;
			
			&:last-child {
				border-bottom: none;
			}
			
			.menu-icon {
				width: 40rpx;
				height: 40rpx;
				margin-right: 20rpx;
			}
			
			text {
				flex: 1;
				font-size: 28rpx;
				color: #333;
			}
			
			.arrow {
				flex: none;
				color: #999;
			}
		}
	}
}
</style> 